You can use the phrase out of wedlock when you're talking about a baby born to parents who aren't married.
Although out of wedlock is commonly understood, it's becoming increasingly old-fashioned. You can describe someone whose parents are unwed as having been born out of wedlock, but it's more common to say something like, "She has a single mother," or "His parents aren't legally married." The phrase is based on the word wedlock, which is a thirteenth century way to say "marriage," from the Old English root word wedlac or "marriage vow."